From 3f4df0644c76c88a57a0bbe57a4b469f5dddb71e Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sun, 25 Jan 2015 17:55:01 +0000 Subject: [PATCH] window: Only claim the sequence if keeping the grab If the grab belongs elsewhere, the window won't claim the sequence right away. The sequence may still be claimed afterwards when window dragging starts, but simple clicks won't be consumed this way. This makes it possible to close popovers when clicking on the title region, while still permitting touch/button 1 interaction for every other purpose. https://bugzilla.gnome.org/show_bug.cgi?id=743257 --- gtk/gtkwindow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 0fc90293e8..241f8ede21 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1476,8 +1476,9 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture, if (n_press == 1) priv->drag_possible = TRUE; - gtk_gesture_set_sequence_state (GTK_GESTURE (gesture), - sequence, GTK_EVENT_SEQUENCE_CLAIMED); + if (gtk_widget_has_grab (widget)) + gtk_gesture_set_sequence_state (GTK_GESTURE (gesture), + sequence, GTK_EVENT_SEQUENCE_CLAIMED); break; default: if (!priv->maximized) -- 2.30.2